package cn.tedu._05weibo.pojo.bto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

@Data
public class UserRegDTO {
//    @NotNull(message = "用户名不能为NULL")
//    @NotEmpty(message = "用户名不能为NULL和空字符串")
//    @NotBlank(message = "用户名不能为NULL和空字符串和空白串")
//    @Size(min = 6,max = 12,message = "用户名长度必须在6到12之间")
//    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,7}|^[^\\u4e00-\\u9fa5]{0,14}$",message = "用户名不能超过7个汉字或14个字符")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,7}|^[a-zA-Z0-9]{1,14}$",message = "用户名不能超过7个汉字或14个字符")
    @ApiModelProperty(value = "用户名",required = true,example = "admin")
    private String username;
    @ApiModelProperty(value = "密码",required = true,example = "123456")
    private String password;
    @ApiModelProperty(value = "用户昵称",required = true,example = "min")
    private String nickname;

}
